using System.Collections.Generic;
using Searchtools.Factories;

namespace SearchTools.Providers
{
    /// <summary>
    /// Supplied term lists from meta data providers
    /// </summary>
    public class MetaDataResolver
    {
        /// <summary>
        /// Get ranked terms from provider reference
        /// </summary>
        /// <param name="source">The provider reference</param>
        /// <returns>Dictionary of term->count</returns>
        public static Dictionary<string, int> GetValue(ProviderReference source)
        {
            return Ioc.Resolve<IMetadataProvider>(source.ProviderName)[source.Key];
        }
    }
}